home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #1
/
Commodore_Disk_User_Vol.1_1_1987_-.d64
/
text enhancer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
112 lines
5 print"[147]":poke53281,0:poke53280,0
10 d=10:bd=10:rem values for delays
15 s=0:rem sound is off
20 x=0:y=10:rem co-ordinates of start of text
30 a$="welcome to letterprint by steven hammond":rem text goes in a$
40 p$="bn1d11":rem parameters go in p$
50 gosub50000:rem call the print routine
60 gosub1000:rem call delay between prints
70 a$="this is a versatile program"
80 x=7:y=10:p$="wn0n11":gosub50000:gosub1000
90 a$="to allow you to print text on the screen"
100 x=0:y=10:p$="rn0n00":gosub50000:gosub1000
110 a$="in a variety of manners"
120 x=8:y=10:d=40:p$="wu0n00":gosub50000
125 fort=1to1000:nextt
130 a$="in a variety of manners"
140 x=8:y=10:d=40:p$="wd0n00":gosub50000:print"[147]":d=10
150 a$="there are many things to change"
160 x=5:y=10:p$="gn0n00":gosub50000:gosub1000
170 a$="such as position on screen"
180 x=0:y=0:p$="bn0n00":gosub50000:gosub1010
190 a$="whether printed a bit at a time"
200 x=0:y=3:p$="bn0n10":gosub50000:gosub1010
210 a$="with a cursor"
220 x=0:y=5:p$="bn0n11":gosub50000:gosub1010
230 a$="with a cursor of your choice"
240 x=0:y=7:p$="bn0n11[175]":gosub50000:gosub1010
250 a$="with a line"
260 x=0:y=9:p$="bn1n11":gosub50000:gosub1010
270 a$="or a fading line"
280 x=0:y=12:p$="wn1d11":gosub50000:gosub1010
290 a$="you can have the text slow"
300 x=0:y=14:p$="gn0n11":bd=50:gosub50000:gosub1010
310 a$="or very fast if you like"
320 x=0:y=16:p$="gn0n11":bd=2:gosub50000:gosub1010
330 a$="and of course in a choice of colours"
340 bd=10:x=0:y=18:p$="rd0n00":gosub50000:gosub1000
350 a$="and with sound should you need it":x=0:y=0:p$="gn0n10":s=1:gosub50000
360 s=0:gosub1000
370 a$="demonstration over":x=10:y=10:p$="":gosub50000
999 goto999
1000 fort=1to1000:nextt:print"[147]":return
1010 fort=1to1000:nextt:return
50000 ifp$=""thenp$="wn1d1n"
50005 c$=left$(p$,1):f$=mid$(p$,2,1)
50010 l=val(mid$(p$,3,1))
50020 ifl=1thenbat=val(mid$(p$,5,1)):lf$=mid$(p$,4,1)
50030 ifl=0thenbat=val(mid$(p$,5,1)):lf$=mid$(p$,4,1)
50040 ifbat=1andl=1thencu=val(mid$(p$,6,1))
50050 ifbat=1andl=0thencu=val(mid$(p$,6,1))
50070 ifcu=1andl=0thenct$=mid$(p$,7,1)
50080 ifcu=1andl=1thenct$=mid$(p$,7,1)
50085 ifct$=""thenct$=" [146]"
50086 f1$=f$
50090 ifc$="w"andf$="u"thenco$="[151][152][155]"
50100 ifc$="w"andf$="d"thenco$="[155][152][151]"
50105 ifc$="w"andlf$<>"n"theng$="[155][152][151]"
50110 ifc$="b"andf$="u"thenco$="[154][159]"
50120 ifc$="b"andf$="d"thenco$="[159][154]"
50125 ifc$="b"andlf$<>"n"theng$="[159][154]"
50130 ifc$="g"andf$="u"thenco$="[153]"
50140 ifc$="g"andf$="d"thenco$="[153]"
50145 ifc$="g"andlf$<>"n"theng$="[153]"
50150 ifc$="r"andf$="u"thenco$="[150]"
50160 ifc$="r"andf$="d"thenco$="[150]"
50165 ifc$="r"andlf$<>"n"theng$="[150]"
50170 ifc$="y"andf$="u"thenco$="[129][158]"
50180 ifc$="y"andf$="d"thenco$="[158][129]"
50182 f$=f1$
50185 ifc$="y"andlf$<>"n"theng$="[158][129]"
50190 k$="[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
50200 y$=""
50210 li$=left$(k$,len(a$))
50212 v$=left$(y$,y)
50215 ifbat=1then50240
50220 iff$="n"thengosub50400:gosub50450
50230 iff$<>"n"thengosub50500
50240 ifcu=0andbat=1thengosub50600
50250 ifcu=1andbat=1thengosub50700
50260 ifl=0thenreturn
50270 iflf$="u"thengosub51000
50275 iflf$="d"thengosub50800
50280 iflf$="n"thengosub50400:gosub50900
50395 return
50400 ifc$="w"thenco$="[151]"
50410 ifc$="b"thenco$=""
50420 ifc$="g"thenco$=""
50430 ifc$="r"thenco$=""
50440 ifc$="y"thenco$=""
50445 return
50450 print"";tab(x);v$;co$;a$:return
50500 fork=1to4:print"";tab(x);v$;mid$(co$,k,1);a$
50510 fort=1tod:nextt
50520 nextk:return
50600 print"";tab(x);v$;:gosub50400:printco$;
50605 fork=1tolen(a$)
50610 printmid$(a$,k,1);:fort=1tobd:nextt:ifs=1thengosub51100
50620 nextk:return
50700 print"";tab(x);v$;:gosub50400:printco$;
50705 fork=1tolen(a$)
50710 printmid$(a$,k,1);ct$;"[157]";:fort=1tobd:nextt
50720 ifs=1thengosub51100
50730 nextk:print" ":return
50800 fork=1to4:print"";tab(x);v$;"";mid$(g$,k,1);li$
50810 fort=1tod:nextt
50820 nextk:return
50900 print"";tab(x);v$;"";li$:return
51000 fork=4to1step-1:print"";tab(x);v$;"";mid$(g$,k,1);li$
51010 fort=1tod:nextt
51020 nextk:return
51100 poke54296,8:poke54296,0:return